<!DOCTYPE html>
<html lang="en">
  <head>
    <link rel="icon shortcut" href="icon/256x256.png" type="image/x-icon" />
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <meta
      content="width=device-width,initial-scale=1,user-scalable=no"
      name="viewport" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <title><%= config.appName %>:<%= package.version %></title>
    <meta name="author" content="<%= package.author %>" />
    <meta name="build" content="<%= nowTimeString %>" />
    <meta name="version" content="<%= gitInfo.VERSION %>" />
    <meta name="branch" content="<%= gitInfo.BRANCH %>" />
    <meta name="hash" content="<%= gitInfo.COMMITHASH %>" />
  </head>

  <body onselectstart="return false">
    <div id="root" style="cursor: default"></div>
    <script>
      function initTopDrag() {
        const topDiv = document.createElement('div');
        topDiv.style.position = 'fixed';
        topDiv.style.top = '0';
        topDiv.style.left = '0';
        topDiv.style.height = '20px';
        topDiv.style.width = '100%';
        topDiv.style.zIndex = '9999';
        topDiv.style.pointerEvents = 'none'; // 用于点击穿透
        topDiv.style['-webkit-user-select'] = 'none'; // 禁止选择文字
        topDiv.style['-webkit-app-region'] = 'drag'; // 拖动
        document.body.appendChild(topDiv);
      }

      window.addEventListener(
        'DOMContentLoaded',
        function onDOMContentLoaded() {
          initTopDrag();
        }
      );
    </script>
  </body>
</html>
